package com.cet.hello;

import java.util.ArrayList;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-04-21 11:29
 **/
public class Demo03 {

    byte[] array = new byte[1024 * 1024];

    public static void main(String[] args) {
        ArrayList<Demo03> list = new ArrayList<>();
        int count = 0;
        try {
            while (true) {
                list.add(new Demo03());
                count = count + 1;
            }
        } catch (Error e) {
            System.out.println("count:"+count);
            e.printStackTrace();
        }
    }

    //-Xms1m -Xmx8m -XX:+HeapDumpOnOutOfMemoryError
}
